<?php
//抑制所有错误信息
@error_reporting(E_ALL &~ E_NOTICE);
@set_time_limit(0);
date_default_timezone_set('PRC');
if (!isset($_SERVER['PHP_SELF']) || empty($_SERVER['PHP_SELF'])) $_SERVER['PHP_SELF']=$_SERVER['SCRIPT_NAME'];
if (defined('HEADCHAR')) header(HEADCHAR);
/*****************************************/
/*		 定义常用常量、引入必要文件		*/
/*****************************************/
$_ENV['HOME']=array();
define('ROOT',str_replace('\\','/',dirname(__FILE__)).'/');
define('INC',ROOT.'include/');
define('DATA',ROOT.'data/');
define('TPL',DATA.'template/');
require(DATA.'db.inc.php');
require(DATA.'config.inc.php');
if (!isset($_COOKIE['homelang'])) define('LANG',$_ENV['HOME']['config']['language']);
else define('LANG',$_COOKIE['homelang']);
require(INC.'lang.inc.php');
require(INC.'common.func.php');
require(INC.'base.php');
?>